class Solution(object):
    def minimumMoves(self, s):
        count = 0
        n = len(s)
        index = 0
        while index < n:
            if s[index] == 'X':
                count += 1
                index += 3
            else:
                index += 1
        return count
